TPMC Exit Point Long Parm List -- Update JDE F47012 Detail Lines

EXTOL RPGLE - Inbound Exit Point using Long Parm List to update JDE F47012 detail lines

For additional EXTOL EDI Integrator RPGLE Examples: Sean Hoppe Consulting Group Coding Samples

     H Debug(*Yes) Datedit(*Ymd)
     H
     H*====================================================
     H*  SET ORDER FOR LOWE'S
     H*
     H*====================================================
     H* Maintenance   :
     H*====================================================
     H*==================================================================================
     H*          Date    Description
     H*   ---- ---------- ----------------------------------------------------------------
     H*        07/22/2014 Original Compile.
     H***********************************************************************************
     FF47012    UF   E           K DISK    Rename(F47012:I47012)
     FF47011    UF   E           K DISK    RENAME(F47011:I47011)
     FF4101_2   IF   E           K DISK    RENAME(F4101:I4101)
     FF0101     IF   E           K DISK    RENAME(F0101:I0101)
     FF4714     UF A E           K DISK    RENAME(F4714:I4714)
     D TAB1            S             25    DIM(5) CTDATA PERRCD(1)
     D TAB2            S             25    DIM(5) ALT(TAB1)
      *
     D                 DS
     D  TESTD1                 1      6  0
     D  TMONTH                 1      2  0
     D  TDAY                   3      4  0
     D  TYEAR                  5      6  0
     D                 DS
     D  TESTD3                 1      6  0
     D  CY3                    1      3  0
     D  CD3                    4      6  0
      * Data structures:
     d*Pgmds         EsDs                  Extname(EXPGSDS)
      * Program data structure
     d Jbdttm          Ds
      * Job date/time
      * Parameter declarations
     D P1Parm          DS
      * O : MAP Function status
     D  P1Fsts                 1      1
     D P2Parm          DS
      * O : MAP In process status
     D  P2Ists                 1      1
     D P3Parm          DS
      * FLD: Trading pnr msg cls exit
      * I : MAP Message level event code
     D  P3Mlev                 1      2
      * I : MAP Processing option
     D  P3Prop                 3      3
      * I : MAP Scheduling priority
     D  P3Scpr                 4      4
      * I : MAP Submit with job name
     D  P3Sbjn                 5     14
      * I : MAP Submit with job desc
     D  P3Sbjd                15     24
      * I : MAP Submit with job desc libr
     D  P3Sjdl                25     34
      * I : MAP Submit to job queue
     D  P3Sbjq                35     44
      * I : MAP Submit job queue priority
     D  P3Sbjp                45     45
      * I : MAP Submit with user name
     D  P3Sbju                46     55
      * I : MAP Submit with routing data
     D  P3Srtg                56     95
      * I : MAP Days to retain data
     D  P3Drdt                96     98P 0
      * I : MAP Days to retain logs
     D  P3Drlg                99    101P 0
      * I : MAP Hours before ack is late
     D  P3Hral               102    104P 2
      * I : MAP Exit point status
     D  P3Exst               105    105
      * I : MAP Exit point operation
     D  P3Exop               106    106
      * I : MAP Exit action on return
     D  P3Eact               107    107
      * I : MAP Return value pass
     D  P3Prtn               108    114
      * I : MAP Function status - pass
     D  P3Fspa               115    115
      * I : MAP In process status - pass
     D  P3Ispa               116    116
      * I : MAP Return value fail
     D  P3Frtn               117    123
      * I : MAP Function status - fail
     D  P3Fsfa               124    124
      * I : MAP In process status - fail
     D  P3Isfa               125    125
      * I : MAP External pgm Parm type
     D  P3Expt               126    126
      * I : MAP External program name
     D  P3Expg               127    136
      * I : MAP External program library
     D  P3Exlb               137    146
      * I : MAP Exit command string
     D  P3Ecmd               147    402
     D P4Parm          DS
      * FLD: Log of message
      * I : MAP Message log number
     D  P4Msln                 1      6P 0
      * I : MAP Connection log number
     D  P4Cnln                 7     10P 0
      * I : MAP Interchange log number
     D  P4Inln                11     15P 0
      * I : MAP Group log number
     D  P4Gpln                16     20P 0
      * I : MAP Application data log #
     D  P4Apln                21     25P 0
      * I : MAP Trading partner codeRef 1
     D  P4Tpc1                26     31
      * I : MAP Group code          Ref 1
     D  P4Gpc1                32     37
      * I : MAP Message ID
     D  P4Msid                38     43
      * I : MAP Message class
     D  P4Mscl                44     53
      * I : MAP Message ID          Ref 1
     D  P4Msi1                54     59
      * I : MAP Message class       Ref 1
     D  P4Msc1                60     69
      * I : MAP Message direction
     D  P4Msdi                70     70
      * I : MAP Function status - message
     D  P4Fstm                71     71
      * I : MAP In process status - msg
     D  P4Istm                72     72
      * I : MAP Ack status - message
     D  P4Astm                73     73
      * I : MAP Reference # 1
     D  P4Ref1                74    103
      * I : MAP Reference # 2
     D  P4Ref2               104    133
      * I : MAP Reference # 3
     D  P4Ref3               134    163
      * I : MAP Reference date 1
     D  P4Rfd1               164    169P 0
      * I : MAP Reference date 2
     D  P4Rfd2               170    175P 0
      * I : MAP Message control reference
     D  P4Mscr               176    189
      * I : MAP Controlling agncy log msg
     D  P4Ctam               190    191
      * I : MAP Standard class log of msg
     D  P4Sclm               192    192
      * I : MAP Industry group log of msg
     D  P4Iglm               193    193
      * I : MAP V-R Log of message
     D  P4Vrlm               194    199
      * I : MAP Industry group ID log msg
     D  P4Igim               200    205
      * I : MAP Common access reference
     D  P4Carf               206    240
      * I : MAP Transfer status
     D  P4Sttf               241    241
      * I : MAP Transfer sequence
     D  P4Sqtf               242    243P 0
      * I : MAP Start wrapped record
     D  P4Wrrs               244    248P 0
      * I : MAP Start wrap char position
     D  P4Wrcs               249    251P 0
      * I : MAP Application file name
     D  P4Gfil               252    261
      * I : MAP Record format name
     D  P4Rcfm               262    271
      * I : MAP Relative record number
     D  P4Rrnm               272    276P 0
      * I : MAP Start nonwrapped record
     D  P4Nwrs               277    281P 0
      * I : MAP End nonwrapped record
     D  P4Nwre               282    286P 0
      * I : MAP Start nonwrap record(app)
     D  P4Nwas               287    291P 0
      * I : MAP End nonwrap record (app)
     D  P4Nwae               292    296P 0
      * I : MAP Sequence# of assoc. ack.
     D  P4Aref               297    302P 0
      * I : MAP Translation job control
     D  P4Tjob               303    308P 0
      *
     d Optrtn          ds
      * Listing of valid Return Request Qualifiers
      *   @@ in retruned value replace with the field prefix.
     d  @@UpdateFlag           1     10    Inz('UPDATEFLG')
      *
     C*
     C                   Exsr      Srinit
     C*
     C                   Z-ADD     UMONTH        TMONTH
     C                   Z-ADD     UDAY          TDAY
     C                   Z-ADD     UYEAR         TYEAR
     C*
     C                   Z-ADD     TESTD1        DATE1            15 5
     C                   Z-ADD     *ZEROS        DATE2            15 5
     C                   CALL      'CVTJUL'
     C                   PARM                    DATE1
     C                   PARM                    DATE2
     C*
     C                   Z-ADD     P4MSLN        EDOC             15 5
     C                   MOVEL     P4TPC1        TPARTNER          6
     C*
     C                   Z-ADD     EDOC          KDOC              9 0
     C*
     C*
     C     KF47012       KLIST
     C                   KFLD                    KDOC
     C*
     C*    GET HEADER INFO
     C*
     C                   EXSR      GET47011
     C*
     C*
     C*
     C                   MOVE      *OFF          *IN90
     C*
     C     KF47012       SETLL     I47012
     C*
     C*
     C     *IN90         DOWEQ     *OFF
     C*
     C     KF47012       READE     I47012                                 90
     C*
     C     *IN90         IFEQ      *ON
     C                   ITER
     C                   END
     C*
     C     SZLITM        CHAIN     F4101_2                            77
     C     *IN77         IFEQ      *OFF
     C                   MOVE      *OFF          *IN50
     C     SZLITM        LOOKUP    TAB1          TAB2                     50
     C                   MOVE      *BLANKS       MESSAGE          60
     C     *IN50         IFEQ      *ON
     C*
     C* CR IS CARRIAGE RETURN.  EDWARDS WILL START IT ON A NEW LINE.
     C*
     C                   MOVE      X'0D2540'     CR                3
     C                   EVAL      MESSAGE = CR + ' ITEM ' + %TRIM(SZLITM) +
     C                             ' CHANGED TO ' + %TRIM(TAB2) + ' IN EXTOL'
     C                   EXSR      ORDERNOTE
     C                   MOVEL     TAB2          SZLITM
     C     SZLITM        CHAIN     F4101_2                            78
     C     *IN78         IFEQ      *OFF
     C                   Z-ADD     IMITM         SZITM
     C                   END
     C                   END
     C                   END
     C*
     C                   EXCEPT    UPD47012
     C*
     C                   ENDDO
     C*
     C*
     C     SKIP01        TAG
     C*
     C                   SETON                                        LR
     C*
     C*
     C*
     C     GET47011      BEGSR
     C*
     C     KF47012       SETLL     I47011
     C*
     C                   SETOFF                                       90
     C*
     C     *IN90         DOWEQ     *OFF
     C*
     C     KF47012       READE     I47011                                 90
     C*
     C     *IN90         IFEQ      *ON
     C                   ITER
     C                   END
     C*
     C     SYPNID        IFNE      TPARTNER
     C                   ITER
     C                   END
     C*
     C     SYSHAN        CHAIN     F0101                              73
     C     *IN73         IFEQ      *OFF
     C                   MOVE      ABMCU         SVMCU            12
     C                   END
     C*
     C                   ENDDO
     C*
     C                   ENDSR
     C*
      **************************************************************************
      * Srinit - Initialization.
      **************************************************************************
     C     Srinit        Begsr
      *
      * Initialise indicators for re-entry
     C                   Move      '0'           *In
      *
     C     Eninit        Endsr
      **************************************************************************
      * Srdefn - Definitions
      **************************************************************************
     C     Srdefn        Begsr
      *
      * Entry parameters
     C     *Entry        Plist
     C                   Parm      *Blanks       W0Rtn             7
     C     P1Fsts        Parm      *Blanks       Wq0001            1            FunCtion status
     C     P2Ists        Parm      *Blanks       Wq0002            1            In process stat
     C     P3Mlev        Parm                    Wq0003            2            Message level e
     C     P3Prop        Parm                    Wq0004            1            Processing opti
     C     P3Scpr        Parm                    Wq0005            1            Scheduling prio
     C     P3Sbjn        Parm                    Wq0006           10            Submit with job
     C     P3Sbjd        Parm                    Wq0007           10            Submit with job
     C     P3Sjdl        Parm                    Wq0008           10            Submit with job
     C     P3Sbjq        Parm                    Wq0009           10            Submit to job q
     C     P3Sbjp        Parm                    Wq0010            1            Submit job queu
     C     P3Sbju        Parm                    Wq0011           10            Submit with use
     C     P3Srtg        Parm                    Wq0012           40            Submit with rou
     C     P3Drdt        Parm                    Wq0013            5 0          Days to retain
     C     P3Drlg        Parm                    Wq0014            5 0          Days to retain
     C     P3Hral        Parm                    Wq0015            5 2          Hours before ac
     C     P3Exst        Parm                    Wq0016            1            Exit point stat
     C     P3Exop        Parm                    Wq0017            1            Exit point oper
     C     P3Eact        Parm                    Wq0018            1            Exit action on
     C     P3Prtn        Parm                    Wq0019            7            Return value pa
     C     P3Fspa        Parm                    Wq0020            1            Function status
     C     P3Ispa        Parm                    Wq0021            1            In process stat
     C     P3Frtn        Parm                    Wq0022            7            Return value fa
     C     P3Fsfa        Parm                    Wq0023            1            Function status
     C     P3Isfa        Parm                    Wq0024            1            In process stat
     C     P3Expt        Parm                    Wq0025            1            External pgm pa
     C     P3Expg        Parm                    Wq0026           10            External progra
     C     P3Exlb        Parm                    Wq0027           10            External progra
     C     P3Ecmd        Parm                    Wq0028          256            Exit command st
     C     P4Msln        Parm                    Wq0029           11 0          Message log num
     C     P4Cnln        Parm                    Wq0030            7 0          Connection log
     C     P4Inln        Parm                    Wq0031            9 0          Interchange log
     C     P4Gpln        Parm                    Wq0032            9 0          Group log numbe
     C     P4Apln        Parm                    Wq0033            9 0          Application dat
     C     P4Tpc1        Parm                    Wq0034            6            Trading partner
     C     P4Gpc1        Parm                    Wq0035            6            Group code
     C     P4Msid        Parm                    Wq0036            6            Message ID
     C     P4Mscl        Parm                    Wq0037           10            Message class
     C     P4Msi1        Parm                    Wq0038            6            Message ID
     C     P4Msc1        Parm                    Wq0039           10            Message class
     C     P4Msdi        Parm                    Wq0040            1            Message directi
     C     P4Fstm        Parm                    Wq0041            1            Function status
     C     P4Istm        Parm                    Wq0042            1            In process stat
     C     P4Astm        Parm                    Wq0043            1            Ack status - me
     C     P4Ref1        Parm                    Wq0044           30            Reference # 1
     C     P4Ref2        Parm                    Wq0045           30            Reference # 2
     C     P4Ref3        Parm                    Wq0046           30            Reference # 3
     C     P4Rfd1        Parm                    Wq0047           11 0          Reference date
     C     P4Rfd2        Parm                    Wq0048           11 0          Reference date
     C     P4Mscr        Parm                    Wq0049           14            Message control
     C     P4Ctam        Parm                    Wq0050            2            Controlling agn
     C     P4Sclm        Parm                    Wq0051            1            Standard class
     C     P4Iglm        Parm                    Wq0052            1            Industry group
     C     P4Vrlm        Parm                    Wq0053            6            V-R Log of mess
     C     P4Igim        Parm                    Wq0054            6            Industry group
     C     P4Carf        Parm                    Wq0055           35            Common access r
     C     P4Sttf        Parm                    Wq0056            1            Transfer status
     C     P4Sqtf        Parm                    Wq0057            2 0          Transfer sequen
     C     P4Wrrs        Parm                    Wq0058            9 0          Start wrapped r
     C     P4Wrcs        Parm                    Wq0059            5 0          Start wrap char
     C     P4Gfil        Parm                    Wq0060           10            Application fil
     C     P4Rcfm        Parm                    Wq0061           10            Record format n
     C     P4Rrnm        Parm                    Wq0062            9 0          Relative record
     C     P4Nwrs        Parm                    Wq0063            9 0          Start nonwrappe
     C     P4Nwre        Parm                    Wq0064            9 0          End nonwrapped
     C     P4Nwas        Parm                    Wq0065            9 0          Start nonwrap r
     C     P4Nwae        Parm                    Wq0066            9 0          End nonwrap rec
     C     P4Aref        Parm                    Wq0067           11 0          Sequence# of as
     C     P4Tjob        Parm                    Wq0068           11 0          Translation job
     C*                                                                         Translation job
     C     Endefn        Endsr
     C*
     C*
     C*
     C     ORDERNOTE     BEGSR
     C*
     C     LIST1         KLIST
     C                   KFLD                    ZTFILE
     C                   KFLD                    ZTEDOC
     C                   KFLD                    ZTEDCT
     C                   KFLD                    ZTEKCO
     C***                KFLD                    ZTEDLN
     C***                KFLD                    ZTLINS
     C*
     C                   MOVEL     'F47011    '  ZTFILE
     C                   Z-ADD     SZEDOC        ZTEDOC
     C                   MOVEL     SZEDCT        ZTEDCT
     C                   MOVEL     SZEKCO        ZTEKCO
     C     LIST1         SETLL     F4714                              90  91
     C     *IN90         IFEQ      *ON
     C                   Z-ADD     *ZERO         ZTEDLN
     C                   Z-ADD     *ZERO         ZTLINS
     C                   END
     C     *IN91         IFEQ      *ON
     C     LIST1         SETGT     F4714
     C     LIST1         READPE    F4714
     C                   Z-ADD     ZTEDLN        SVEDLN            7 3
     C                   Z-ADD     ZTLINS        SVLINS            9 2
     C                   END
     C                   ADD       1000          ZTEDLN
     C                   ADD       1000          ZTLINS
     C                   EVAL      ZTTXLN = MESSAGE
     C                   MOVEL     'EXTOLOWN  '  ZTUSER
     C                   MOVEL     'SETLOWES  '  ZTPID
     C                   Z-ADD     DATE2         ZTUPMJ
     C                   TIME                    ZTTDAY
     C                   WRITE     I4714
     C
     C*
     C                   ENDSR
     C*
     OI47012    E            UPD47012
     O                       SZLITM
     O                       SZITM
**
36708229                 36708259
36728229                 36728259
36703229                 36703259
36776229                 36776259
36777229                 36777259





By: on